import { BaseModel, YesNo } from './base-model'

export interface LoginModel {
  username: string
  password: string

  // 验证码相关
  uuid?: string
  code?: string
}

export interface Token {
  tokenType?: { value: string }
  tokenValue: string
}

export interface LoginResp {
  accessToken: Token
  refreshToken: Token
}

export interface CategoryQuery {
  id?: string
  name?: string
  parentId?: string
  recursive?: boolean
  delFlag?: YesNo
}

export interface CategoryModel extends BaseModel {
  id: string
  parentId ?: string
  ancestors?: string
  name: string
  icon?: string
  isLeaf?: string
  sortNum: number
  children?: CategoryModel[]
}
